package com.wf.course.service.impl;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.utils.page.PageBean;
import com.wf.course.dao.IGoodsCommentImgMapper;
import com.wf.course.model.goods.GoodsCommentImg;
import com.wf.course.service.IGoodsCommentImgService;

@Service
@Transactional(rollbackFor=Exception.class)
public class IGoodsCommentImgServiceImpl implements IGoodsCommentImgService{
	
	@Autowired
	private IGoodsCommentImgMapper mapper;

	@Override
	public void indexInfo(PageBean<GoodsCommentImg> pageBean) {
		// TODO Auto-generated method stub
		pageBean.setResults(this.mapper.queryList(pageBean));
		pageBean.setTotalCount(this.mapper.getTotalCount(pageBean).intValue());
	}

	@Override
	public void saveGoodsCommentImgOrUpdate(GoodsCommentImg goodsCommentImg) {
		// TODO Auto-generated method stub
		this.mapper.saveGoodsCommentImg(goodsCommentImg);
	}

	@Override
	public GoodsCommentImg queryGoodsCommentImgById(Integer id) {
		// TODO Auto-generated method stub
		return this.mapper.queryGoodsCommentImgById(id);
	}

	@Override
	public void deleteById(Integer id) {
		// TODO Auto-generated method stub
		this.mapper.deleteById(id);
	}
	@Override
	public List<GoodsCommentImg> queryGoodsCommentImgs(Integer commentId){
		return this.mapper.queryGoodsCommentImgs(commentId);
	}
	
}
